Ext.define(Fsl.app.getAbsModel('M01I005001'), {
    extend      : 'Ext.data.Model',
    alias       : Fsl.app.getAlias('M01I005001'),
    idProperty  : 'id', 
    fields      : [
        {name:'id',              mapping:'id',                type:'int'},
        {name:'nameEn',          mapping:'nameEn',            type:'string'},
		{name:'nameBn',          mapping:'nameBn',            type:'string'},
		{name:'countyCode',      mapping:'countyCode',        type:'int'}
    ],
    validations :[       
        {type:'format', field:'nameEn', matcher: Fsl.regexp.Name.en.re},
		{type:'format', field:'nameBn', matcher: Fsl.regexp.Name.bn.op},
		{type:'length', field:'nameEn', min: 2, max: 45},
        {type:'length', field:'nameBn', min: 0, max: 45}
    ],
    proxy       : Fsl.proxy.getAjaxApiProxy('M01I005001'),
    belongsTo   : [
		Fsl.data.getBelongsTo('M01I004001', 'id', 'countyCode', 'county')
	],
    hasMany     :[ 
		Fsl.data.getHasMany('M01I006001', 'id', 'divisionCode', 'cityCorporations'),
		Fsl.data.getHasMany('M01I007001', 'id', 'divisionCode', 'districtes ')
    ]	
});